/*    file: CSecureDataStore.h
 *    desc:
 *   
 * created: 2017-08-01
 *  author: chuanjiang.zh@qq.com
 * company: 
 */ 


#if !defined CSECUREDATASTORE_H_
#define CSECUREDATASTORE_H_

#include "SecureDataStore.h"
#include "SqliteStore.h"

class CSecureDataStore : public SecureDataStore
{
public:
	CSecureDataStore();
	~CSecureDataStore();

	virtual bool open(const std::string& filepath);

	virtual void close();

	virtual bool isOpen();

	virtual bool getValue(const std::string& key, std::string& value);

	virtual bool contains(const std::string& key);

	virtual bool setValue(const std::string& key, const std::string& value);

	virtual bool removeValue(const std::string& key);

	virtual void removeValues();

	virtual int getKeys(std::vector< std::string >& keys);

	virtual int findKeys(const std::string& pattern, std::vector< std::string >& keys);

protected:
	bool createTables();

protected:
	SqliteStore	m_sqlite;

};


#endif //CSECUREDATASTORE_H_

